package com.da.springtest.autowired.test6;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MainConfig7 {
    @Bean
    public Service1 service1() {
        return new Service1();
    }

    @Bean
    public Service2 service2() {
        return new Service2();
    }

    @Bean
    public Service3 service3(Service1 s1, Service2 s2) {
        Service3 service3 = new Service3();
        service3.setService1(s1);
        service3.setService2(s2);
        return service3;
    }
}